fix(http): include request URL on ApiError#310
Conversation
Append [request: METHOD url] when error.config is present to ease debugging proxy/404 mismatches. Bump to 0.0.192 for release.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated package version from 0.0.127 to 0.0.192. Enhanced HTTP client error handling to append request method and URL details to API error messages when request configuration is available. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| // Non-standard bodies (e.g. reverse-proxy "404 page not found") rarely include Canton fields; the URL is the best repro hint. | ||
| if (error.config?.url) { | ||
| msg += ` [request: ${error.config.method ?? 'GET'} ${error.config.url}]`; |
There was a problem hiding this comment.
Axios method is lowercase, inconsistent with uppercase fallback
Low Severity
Axios normalizes config.method to lowercase internally (e.g. 'get', 'post'), so this will produce messages like [request: get https://…] instead of the conventional uppercase form. The uppercase 'GET' fallback reveals the intent was to display methods in uppercase, but .toUpperCase() is missing on error.config.method, creating an inconsistency between the normal and fallback paths.


Summary
Append
[request: METHOD url]toApiErrormessages when Axios provideserror.config(helps debug wrong base URL / 404s).Release
Publish v0.0.192 after merge.
Related
Note
Low Risk
Low risk: only changes error-message formatting by appending Axios
method/urlwhen available, plus a package version bump.Overview
Improves
HttpClienterror diagnostics by appending[request: METHOD url]toApiErrormessages when Axios provideserror.config.url, making 404s/misconfigured base URLs easier to reproduce.Bumps package version from
0.0.127to0.0.192.Written by Cursor Bugbot for commit 05f9da5. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Chores
Bug Fixes